.class final Lcom/ninesky/browser/provider/downloads/i;
.super Ljava/lang/Object;


# instance fields
.field private a:Landroid/content/Context;

.field private b:Ljava/util/HashMap;

.field private c:Lcom/ninesky/browser/provider/downloads/l;


# direct methods
.method constructor <init>(Landroid/content/Context;Lcom/ninesky/browser/provider/downloads/l;)V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    iput-object p2, p0, Lcom/ninesky/browser/provider/downloads/i;->c:Lcom/ninesky/browser/provider/downloads/l;

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/ninesky/browser/provider/downloads/i;->b:Ljava/util/HashMap;

    return-void
.end method

.method private b(Ljava/util/List;)V
    .locals 12

    const/4 v10, 0x1

    const/4 v9, 0x0

    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_0
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_1

    return-void

    :cond_1
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/ninesky/browser/provider/downloads/s;

    iget v2, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    const/16 v3, 0xc8

    if-lt v2, v3, :cond_4

    iget v2, v0, Lcom/ninesky/browser/provider/downloads/s;->h:I

    if-ne v2, v10, :cond_4

    move v2, v10

    :goto_1
    if-eqz v2, :cond_0

    new-instance v2, Landroid/app/Notification;

    invoke-direct {v2}, Landroid/app/Notification;-><init>()V

    const v3, 0x1080082

    iput v3, v2, Landroid/app/Notification;->icon:I

    iget v3, v0, Lcom/ninesky/browser/provider/downloads/s;->a:I

    int-to-long v3, v3

    iget-object v5, v0, Lcom/ninesky/browser/provider/downloads/s;->y:Ljava/lang/String;

    if-eqz v5, :cond_2

    invoke-virtual {v5}, Ljava/lang/String;->length()I

    move-result v6

    if-nez v6, :cond_3

    :cond_2
    iget-object v5, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v6, 0x7f070192

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    :cond_3
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    sget-object v7, Lcom/ninesky/browser/provider/downloads/w;->a:Landroid/net/Uri;

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, "/"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    iget v4, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    invoke-static {v4}, Lcom/ninesky/browser/provider/downloads/w;->b(I)Z

    move-result v4

    if-eqz v4, :cond_5

    iget-object v4, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    const v6, 0x7f070196

    invoke-virtual {v4, v6}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v4

    new-instance v6, Landroid/content/Intent;

    const-string v7, "android.intent.action.DOWNLOAD_LIST"

    invoke-direct {v6, v7}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    move-object v11, v6

    move-object v6, v4

    move-object v4, v11

    :goto_2
    iget-object v7, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    invoke-virtual {v7}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v7

    const-class v8, Lcom/ninesky/browser/provider/downloads/DownloadReceiver;

    invoke-virtual {v8}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v4, v7, v8}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    invoke-virtual {v4, v3}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    iget-wide v7, v0, Lcom/ninesky/browser/provider/downloads/s;->n:J

    iput-wide v7, v2, Landroid/app/Notification;->when:J

    iget-object v7, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    iget-object v8, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    invoke-static {v8, v9, v4, v9}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v4

    invoke-virtual {v2, v7, v5, v6, v4}, Landroid/app/Notification;->setLatestEventInfo(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V

    new-instance v4, Landroid/content/Intent;

    const-string v5, "android.intent.action.DOWNLOAD_HIDE"

    invoke-direct {v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    iget-object v5, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v5

    const-class v6, Lcom/ninesky/browser/provider/downloads/DownloadReceiver;

    invoke-virtual {v6}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v4, v5, v6}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    invoke-virtual {v4, v3}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    iget-object v3, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    invoke-static {v3, v9, v4, v9}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v3

    iput-object v3, v2, Landroid/app/Notification;->deleteIntent:Landroid/app/PendingIntent;

    iget-object v3, p0, Lcom/ninesky/browser/provider/downloads/i;->c:Lcom/ninesky/browser/provider/downloads/l;

    iget v0, v0, Lcom/ninesky/browser/provider/downloads/s;->a:I

    invoke-interface {v3, v0, v2}, Lcom/ninesky/browser/provider/downloads/l;->a(ILandroid/app/Notification;)V

    goto/16 :goto_0

    :cond_4
    move v2, v9

    goto/16 :goto_1

    :cond_5
    iget-object v4, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    const v6, 0x7f070195

    invoke-virtual {v4, v6}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v4

    iget v6, v0, Lcom/ninesky/browser/provider/downloads/s;->g:I

    if-nez v6, :cond_6

    new-instance v6, Landroid/content/Intent;

    const-string v7, "android.intent.action.DOWNLOAD_OPEN"

    invoke-direct {v6, v7}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    move-object v11, v6

    move-object v6, v4

    move-object v4, v11

    goto :goto_2

    :cond_6
    new-instance v6, Landroid/content/Intent;

    const-string v7, "android.intent.action.DOWNLOAD_LIST"

    invoke-direct {v6, v7}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    move-object v11, v6

    move-object v6, v4

    move-object v4, v11

    goto :goto_2
.end method


# virtual methods
.method public final a(Ljava/util/List;)V
    .locals 14

    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/i;->b:Ljava/util/HashMap;

    invoke-virtual {v1}, Ljava/util/HashMap;->clear()V

    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v8

    :cond_0
    :goto_0
    invoke-interface {v8}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-nez v1, :cond_1

    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/i;->b:Ljava/util/HashMap;

    invoke-virtual {v1}, Ljava/util/HashMap;->values()Ljava/util/Collection;

    move-result-object v1

    invoke-interface {v1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_1
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-nez v1, :cond_6

    invoke-direct {p0, p1}, Lcom/ninesky/browser/provider/downloads/i;->b(Ljava/util/List;)V

    return-void

    :cond_1
    invoke-interface {v8}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    move-object v0, v1

    check-cast v0, Lcom/ninesky/browser/provider/downloads/s;

    move-object v7, v0

    const/16 v1, 0x64

    iget v2, v7, Lcom/ninesky/browser/provider/downloads/s;->j:I

    if-gt v1, v2, :cond_3

    iget v1, v7, Lcom/ninesky/browser/provider/downloads/s;->j:I

    const/16 v2, 0xc8

    if-ge v1, v2, :cond_3

    iget v1, v7, Lcom/ninesky/browser/provider/downloads/s;->h:I

    const/4 v2, 0x2

    if-eq v1, v2, :cond_3

    const/4 v1, 0x1

    :goto_2
    if-eqz v1, :cond_0

    iget-object v9, v7, Lcom/ninesky/browser/provider/downloads/s;->o:Ljava/lang/String;

    iget-wide v5, v7, Lcom/ninesky/browser/provider/downloads/s;->t:J

    iget-wide v3, v7, Lcom/ninesky/browser/provider/downloads/s;->u:J

    iget v1, v7, Lcom/ninesky/browser/provider/downloads/s;->a:I

    int-to-long v10, v1

    iget-object v1, v7, Lcom/ninesky/browser/provider/downloads/s;->y:Ljava/lang/String;

    if-eqz v1, :cond_2

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v2

    if-nez v2, :cond_f

    :cond_2
    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f070192

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    move-object v2, v1

    :goto_3
    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/i;->b:Ljava/util/HashMap;

    invoke-virtual {v1, v9}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_4

    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/i;->b:Ljava/util/HashMap;

    invoke-virtual {v1, v9}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/ninesky/browser/provider/downloads/b;

    invoke-virtual/range {v1 .. v6}, Lcom/ninesky/browser/provider/downloads/b;->a(Ljava/lang/String;JJ)V

    :goto_4
    iget v2, v7, Lcom/ninesky/browser/provider/downloads/s;->j:I

    const/16 v3, 0xc1

    if-ne v2, v3, :cond_5

    iget-object v2, v7, Lcom/ninesky/browser/provider/downloads/s;->A:Ljava/lang/String;

    if-eqz v2, :cond_5

    const/4 v2, 0x1

    :goto_5
    if-eqz v2, :cond_0

    iget-object v2, v1, Lcom/ninesky/browser/provider/downloads/b;->h:Ljava/lang/String;

    if-nez v2, :cond_0

    iget-object v2, v7, Lcom/ninesky/browser/provider/downloads/s;->A:Ljava/lang/String;

    iput-object v2, v1, Lcom/ninesky/browser/provider/downloads/b;->h:Ljava/lang/String;

    goto :goto_0

    :cond_3
    const/4 v1, 0x0

    goto :goto_2

    :cond_4
    new-instance v1, Lcom/ninesky/browser/provider/downloads/b;

    invoke-direct {v1}, Lcom/ninesky/browser/provider/downloads/b;-><init>()V

    long-to-int v10, v10

    iput v10, v1, Lcom/ninesky/browser/provider/downloads/b;->a:I

    iput-object v9, v1, Lcom/ninesky/browser/provider/downloads/b;->e:Ljava/lang/String;

    iget-object v10, v7, Lcom/ninesky/browser/provider/downloads/s;->z:Ljava/lang/String;

    iput-object v10, v1, Lcom/ninesky/browser/provider/downloads/b;->f:Ljava/lang/String;

    invoke-virtual/range {v1 .. v6}, Lcom/ninesky/browser/provider/downloads/b;->a(Ljava/lang/String;JJ)V

    iget-object v2, p0, Lcom/ninesky/browser/provider/downloads/i;->b:Ljava/util/HashMap;

    invoke-virtual {v2, v9, v1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_4

    :cond_5
    const/4 v2, 0x0

    goto :goto_5

    :cond_6
    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/ninesky/browser/provider/downloads/b;

    new-instance v3, Landroid/app/Notification;

    invoke-direct {v3}, Landroid/app/Notification;-><init>()V

    iget-object v4, v1, Lcom/ninesky/browser/provider/downloads/b;->h:Ljava/lang/String;

    if-eqz v4, :cond_9

    const/4 v4, 0x1

    :goto_6
    const v5, 0x1080081

    if-eqz v4, :cond_7

    const v5, 0x108008a

    :cond_7
    iput v5, v3, Landroid/app/Notification;->icon:I

    iget v6, v3, Landroid/app/Notification;->flags:I

    or-int/lit8 v6, v6, 0x2

    iput v6, v3, Landroid/app/Notification;->flags:I

    new-instance v6, Landroid/widget/RemoteViews;

    iget-object v7, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    invoke-virtual {v7}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v7

    const v8, 0x7f030025

    invoke-direct {v6, v7, v8}, Landroid/widget/RemoteViews;-><init>(Ljava/lang/String;I)V

    new-instance v7, Ljava/lang/StringBuilder;

    iget-object v8, v1, Lcom/ninesky/browser/provider/downloads/b;->g:[Ljava/lang/String;

    const/4 v9, 0x0

    aget-object v8, v8, v9

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget v8, v1, Lcom/ninesky/browser/provider/downloads/b;->d:I

    const/4 v9, 0x1

    if-le v8, v9, :cond_a

    iget-object v8, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    const v9, 0x7f070193

    invoke-virtual {v8, v9}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v8, v1, Lcom/ninesky/browser/provider/downloads/b;->g:[Ljava/lang/String;

    const/4 v9, 0x1

    aget-object v8, v8, v9

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v8, v1, Lcom/ninesky/browser/provider/downloads/b;->d:I

    iput v8, v3, Landroid/app/Notification;->number:I

    iget v8, v1, Lcom/ninesky/browser/provider/downloads/b;->d:I

    const/4 v9, 0x2

    if-le v8, v9, :cond_8

    iget-object v8, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    const v9, 0x7f070194

    const/4 v10, 0x1

    new-array v10, v10, [Ljava/lang/Object;

    const/4 v11, 0x0

    iget v12, v1, Lcom/ninesky/browser/provider/downloads/b;->d:I

    const/4 v13, 0x2

    sub-int/2addr v12, v13

    invoke-static {v12}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v12

    aput-object v12, v10, v11

    invoke-virtual {v8, v9, v10}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    :cond_8
    :goto_7
    const v8, 0x7f0c0075

    invoke-virtual {v6, v8, v7}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    if-eqz v4, :cond_b

    const v4, 0x7f0c0077

    const/16 v7, 0x8

    invoke-virtual {v6, v4, v7}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    const v4, 0x7f0c0078

    iget-object v7, v1, Lcom/ninesky/browser/provider/downloads/b;->h:Ljava/lang/String;

    invoke-virtual {v6, v4, v7}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    :goto_8
    const v4, 0x7f0c0074

    iget-wide v7, v1, Lcom/ninesky/browser/provider/downloads/b;->c:J

    iget-wide v9, v1, Lcom/ninesky/browser/provider/downloads/b;->b:J

    const-wide/16 v11, 0x0

    cmp-long v11, v7, v11

    if-gtz v11, :cond_d

    const-string v7, ""

    :goto_9
    invoke-virtual {v6, v4, v7}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    const v4, 0x7f0c0073

    invoke-virtual {v6, v4, v5}, Landroid/widget/RemoteViews;->setImageViewResource(II)V

    iput-object v6, v3, Landroid/app/Notification;->contentView:Landroid/widget/RemoteViews;

    new-instance v4, Landroid/content/Intent;

    const-string v5, "android.intent.action.DOWNLOAD_LIST"

    invoke-direct {v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    iget-object v5, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v5

    const-class v6, Lcom/ninesky/browser/provider/downloads/DownloadReceiver;

    invoke-virtual {v6}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v4, v5, v6}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    sget-object v6, Lcom/ninesky/browser/provider/downloads/w;->a:Landroid/net/Uri;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "/"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    iget v6, v1, Lcom/ninesky/browser/provider/downloads/b;->a:I

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    const-string v5, "multiple"

    iget v6, v1, Lcom/ninesky/browser/provider/downloads/b;->d:I

    const/4 v7, 0x1

    if-le v6, v7, :cond_e

    const/4 v6, 0x1

    :goto_a
    invoke-virtual {v4, v5, v6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    iget-object v5, p0, Lcom/ninesky/browser/provider/downloads/i;->a:Landroid/content/Context;

    const/4 v6, 0x0

    const/4 v7, 0x0

    invoke-static {v5, v6, v4, v7}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v4

    iput-object v4, v3, Landroid/app/Notification;->contentIntent:Landroid/app/PendingIntent;

    iget-object v4, p0, Lcom/ninesky/browser/provider/downloads/i;->c:Lcom/ninesky/browser/provider/downloads/l;

    iget v1, v1, Lcom/ninesky/browser/provider/downloads/b;->a:I

    invoke-interface {v4, v1, v3}, Lcom/ninesky/browser/provider/downloads/l;->a(ILandroid/app/Notification;)V

    goto/16 :goto_1

    :cond_9
    const/4 v4, 0x0

    goto/16 :goto_6

    :cond_a
    const v8, 0x7f0c0076

    iget-object v9, v1, Lcom/ninesky/browser/provider/downloads/b;->f:Ljava/lang/String;

    invoke-virtual {v6, v8, v9}, Landroid/widget/RemoteViews;->setTextViewText(ILjava/lang/CharSequence;)V

    goto/16 :goto_7

    :cond_b
    const v4, 0x7f0c0078

    const/16 v7, 0x8

    invoke-virtual {v6, v4, v7}, Landroid/widget/RemoteViews;->setViewVisibility(II)V

    const v4, 0x7f0c0077

    iget-wide v7, v1, Lcom/ninesky/browser/provider/downloads/b;->c:J

    long-to-int v7, v7

    iget-wide v8, v1, Lcom/ninesky/browser/provider/downloads/b;->b:J

    long-to-int v8, v8

    iget-wide v9, v1, Lcom/ninesky/browser/provider/downloads/b;->c:J

    const-wide/16 v11, -0x1

    cmp-long v9, v9, v11

    if-nez v9, :cond_c

    const/4 v9, 0x1

    :goto_b
    invoke-virtual {v6, v4, v7, v8, v9}, Landroid/widget/RemoteViews;->setProgressBar(IIIZ)V

    goto/16 :goto_8

    :cond_c
    const/4 v9, 0x0

    goto :goto_b

    :cond_d
    const-wide/16 v11, 0x64

    mul-long/2addr v9, v11

    div-long v7, v9, v7

    new-instance v9, Ljava/lang/StringBuilder;

    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v9, v7, v8}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const/16 v7, 0x25

    invoke-virtual {v9, v7}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    goto/16 :goto_9

    :cond_e
    const/4 v6, 0x0

    goto :goto_a

    :cond_f
    move-object v2, v1

    goto/16 :goto_3
.end method
